package com.cdh.edu.controller;

import com.cdh.utils.result.Restful;
import io.swagger.annotations.ApiModel;
import org.springframework.web.bind.annotation.*;

@ApiModel(description = "登录管理")
@RestController
@RequestMapping("user")
@CrossOrigin
public class LoginController {

    @PostMapping("login")
    public Restful login() {
        return Restful.ok().data("token","admin");

    }

    @GetMapping("info")
    public Restful info() {
        return Restful.ok()
                .data("roles","admin")
                .data("name","admin")
                .data("avatar", "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }


}
